[DllImport( "user32.dll", SetLastError=true, EntryPoint="GetScrollBarInfo")]
private static extern int GetScrollBarInfo(IntPtr hWnd, uint idObject, ref SCROLLBARINFO psbi);
[StructLayout(LayoutKind.Sequential)]
public struct SCROLLBARINFO
{
public int cbSize;
public Rectangle rcScrollBar;
public int dxyLineButton;
public int xyThumbTop;
public int xyThumbBottom;
public int reserved;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=6)]
public int[] rgstate;
}
None.
Please add some!
SCROLLBARINFO psbi = new SCROLLBARINFO();
psbi.cbSize = Marshal.SizeOf(psbi);
int nResult = GetScrollBarInfo(this.Handle, OBJID_CLIENT, ref psbi); // "this" is a scrollbar
if (nGet == 0)
{
int nLatError = GetLastError(); // in kernel32.dll
}
Do you know one? Please contribute it!